home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 2.5 KB | 118 lines | [TEXT/MPS ] |
- //
- //
- // File: SLResour.idl
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //
-
- #ifndef SLRESOUR_IDL
- #define SLRESOUR_IDL
-
- #ifndef SLSTDDEF_IDL
- #include "SLStdDef.idl"
- #endif
-
- #ifndef SLREFCNT_IDL
- #include "SLRefCnt.idl"
- #endif
-
-
- //==============================================================================
- // Classes defined in this interface
- //==============================================================================
-
- interface FW_OResource;
-
- #if defined(__SOMIDL__)
- #pragma somemittypes on
- #endif
-
- #if defined FW_BUILD_MAC
- typedef short FW_ResourceFileID;
- typedef FW_PlatformHandle FW_ResourceHandle;
- #elif defined FW_BUILD_WIN
- typedef HINSTANCE FW_ResourceFileID;
- typedef HRSRC FW_ResourceHandle;
- #endif
-
- #if defined(__SOMIDL__)
- #pragma somemittypes off
- #endif
-
- interface shutUpAboutTheCommentAlready;
-
- //==============================================================================
- // Types used by this interface
- //==============================================================================
-
- interface FW_OResourceFile;
- typedef somToken FW_CPrivResourceRep;
-
- //========================================================================================
- // FW_OResource
- //
- // Class holding representation for resources.
- //========================================================================================
-
- interface FW_OResource : FW_ORefCount
- {
- void InitFromFile(in FW_OResourceFile file,
- in FW_ResourceId resourceId,
- in FW_ResourceType resourceType);
- // Acquires the resource handle
-
- void* AcquireData();
- // Lock the resource and return a pointer to the data.
- // Client assumes responsiblity to call ReleaseData.
-
- void ReleaseData();
- // Unlock the resource.
-
- unsigned long GetSize();
- // Return the size of this resource in bytes.
-
- FW_ResourceHandle GetResourceHandle();
- // Return the platform (native) handle.
- // This method should be used with caution, since it reveals platform specifics,
- // and allows violation of internal lock counts, etc.
-
- #ifdef __SOMIDL__
- implementation
- {
- functionprefix = FW_OResource__;
-
- override:
- somInit,
- somUninit;
-
- releaseorder:
- somInit,
- somUninit,
-
- InitFromFile,
- AcquireData,
- ReleaseData,
- GetSize,
- GetResourceHandle;
-
- majorversion = 1;
- minorversion = 0;
-
- passthru C_xh =
- "";
-
- passthru C_xih =
- "";
-
- #ifdef __PRIVATE__
- FW_CPrivResourceRep *fRep;
- #endif
- };
- #endif //# __SOMIDL__
- };
-
-
- #endif
-